/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package br.com.deployment.entities;

import java.io.Serializable;
import java.util.List;
import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.OneToMany;
import javax.persistence.OneToOne;
import javax.persistence.SequenceGenerator;

/**
 *
 * @author roniere
 */

/**
 * Resposta
 * @author roniere
 */
@Entity
public class Response implements Serializable{
    
    @Id
    @SequenceGenerator(name = "seq_response", sequenceName = "seq_response", allocationSize = 1)
    @GeneratedValue(generator = "seq_response", strategy = GenerationType.SEQUENCE)
    private Long id;
    
    @Column
    private Long cod;
    
    @Column
    private String idOptions;
    
    @OneToOne
    private Issues issues;
    
    @OneToMany
    private List<Options> optionses;
    @Column
    private String responseOpen;
    @OneToMany(cascade= CascadeType.ALL)
    private List<Determinations> determination;
    @OneToMany(cascade= CascadeType.ALL)
    private List<Anexo> anexo;
    
    
    public Response() {
    }

    public Long getCod() {
        return cod;
    }

    public void setCod(Long cod) {
        this.cod = cod;
    }

    public String getIdOptions() {
        return idOptions;
    }

    public void setIdOptions(String idOptions) {
        
        this.idOptions = idOptions;
    }

    
    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public Issues getIssues() {
        return issues;
    }

    public void setIssues(Issues issues) {
        this.issues = issues;
    }

    public List<Options> getOptionses() {
        return optionses;
    }

    public void setOptionses(List<Options> optionses) {
        this.optionses = optionses;
    }

    public String getResponseOpen() {
        return responseOpen;
    }

    public void setResponseOpen(String responseOpen) {
        this.responseOpen = responseOpen;
    }

    public List<Determinations> getDetermination() {
        return determination;
    }

    public void setDetermination(List<Determinations> determination) {
        this.determination = determination;
    }

    

    public List<Anexo> getAnexo() {
        return anexo;
    }

    public void setAnexo(List<Anexo> anexo) {
        this.anexo = anexo;
    }
    
    

    @Override
    public int hashCode() {
        int hash = 5;
        hash = 41 * hash + (this.id != null ? this.id.hashCode() : 0);
        return hash;
    }

    @Override
    public boolean equals(Object obj) {
        if (obj == null) {
            return false;
        }
        if (getClass() != obj.getClass()) {
            return false;
        }
        final Response other = (Response) obj;
        if (this.id != other.id && (this.id == null || !this.id.equals(other.id))) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "Response{" + "id=" + id + ", cod=" + cod + ", idOptions=" + idOptions + ", issues=" + issues + ", optionses=" + optionses + ", responseOpen=" + responseOpen + ", determination=" + determination + ", anexo=" + anexo + '}';
    }



 
    
    
}
